import threading

tcond = threading.Condition()


def worker_steph():
    tcond.acquire()
    print(threading.currentThread().getName() + ":Hello I'm 猴子")
    tcond.notify()
    tcond.wait()

    print(threading.currentThread().getName() + ":How are you ?")
    tcond.notify()
    tcond.wait()

    print(threading.currentThread().getName() + ":Me too")
    tcond.notify()
    tcond.release()


def worker_john():

    tcond.acquire()
    tcond.wait()

    print(threading.currentThread().getName() + ":Hello I'm 涛")
    tcond.notify()
    tcond.wait()

    print(threading.currentThread().getName() + ": I'm good,you?")
    tcond.notify()
    tcond.wait()

    print(threading.currentThread().getName() + ": Ok")
    tcond.notify()
    tcond.release()


tjohon=threading.Thread(target=worker_john,name='涛')
tsteph=threading.Thread(target=worker_steph,name='猴子')
tjohon.start()
tsteph.start()